/*-----------------------------------------------File Info------------------------------------------------
** File Name:               caluculations.c  
** Last modified date:      2016.07.22
** Last version:            V0.1
** Description:             
**--------------------------------------------------------------------------------------------------------            
** Created date:            2016.09.07
** author:                  YLY
** Version:                 V0.1
** Descriptions:            常用运算函数
**--------------------------------------------------------------------------------------------------------
*/
#ifndef _CALUCULATIONS_H_
#define _CALUCULATIONS_H_
#include <stdio.h>
#include <string.h>
#include <stdint.h>

extern const unsigned char keyBox[256];
extern void reverseData(uint8_t *data, uint16_t size);
extern void rc4_crypt(uint8_t *Data, uint64_t Len, uint32_t SecretKeys);
extern uint8_t ucBufCheckXor(uint8_t *pucBuf, uint16_t usLen);
extern uint8_t ucBufCheckSum(uint8_t *pucBuf, uint16_t usLen);
extern uint16_t usBufCheckSum(uint8_t *pucBuf, uint16_t usLen);
extern uint32_t uiBufCheckSum(uint8_t *pucBuf, uint16_t usLen);
extern uint16_t CRC_GetModbus16(uint8_t *pdata, int len);
#endif	/*_CALUCULATIONS_H_*/



